<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: IndexController.php 2011-03-09 08:45:41Z idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 */

class Vote_IndexController extends Core_Controller_Action_Standard {
	public function indexAction() {
		$table = Engine_Api::_ ()->getDbTable ( 'challenges', 'vote' );
		
		$params = array ('sort' => 'newest', 'type' => 'photo', 'approved' => 1, 'ipp' => 3 );
		$this->view->photoVotings = $photoVotings = $table->getPaginator ( $params );
		
		$params = array ('sort' => 'newest', 'type' => 'video', 'approved' => 1, 'ipp' => 3 );
		$this->view->videoVotings = $videoVotings = $table->getPaginator ( $params );
		
		$params = array ('sort' => 'newest', 'type' => 'music', 'approved' => 1, 'ipp' => 3 );
		$this->view->musicVotings = $musicVotings = $table->getPaginator ( $params );
	}
}